* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f9;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.back-link {
    position: absolute;
    top: 10px;
    left: 10px;
    text-decoration: none;
    color: #d38312;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link:hover {
    color: #a83279;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #3d4e68;
}

header p {
    font-size: 1.1rem;
    color: #667282;
}

main {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.coder-panel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.text-panel h3 {
    margin-bottom: 15px;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #d38312;
    box-shadow: 0 0 0 3px rgba(211, 131, 18, 0.2);
}

.swap-icon {
    font-size: 1.5rem;
    color: #6c757d;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.actions button {
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#encodeBtn { background: #28a745; color: white; }
#decodeBtn { background: #007bff; color: white; }
#clearBtn { background: #dc3545; color: white; }

#encodeBtn:hover { background: #218838; }
#decodeBtn:hover { background: #0069d9; }
#clearBtn:hover { background: #c82333; }

.file-section {
    border-top: 2px solid #e0e6ed;
    padding-top: 30px;
}

.file-section h3 {
    margin-bottom: 20px;
}

.file-drop-area {
    border: 3px dashed #e0e6ed;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: border-color 0.3s, background-color 0.3s;
}

.file-drop-area.dragover {
    border-color: #d38312;
    background-color: #fff8f0;
}

.file-drop-area label {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}

.file-info {
    margin-top: 15px;
    font-family: 'Courier New', Courier, monospace;
}

.image-preview-section {
    margin-top: 30px;
    border-top: 2px solid #e0e6ed;
    padding-top: 30px;
}

.image-container {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 100%;
    overflow: auto;
}

#decodedImage {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

#downloadImageBtn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#downloadImageBtn:hover {
    background-color: #218838;
}

@media (max-width: 992px) {
    .coder-panel {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto 1fr;
    }
    .swap-icon {
        transform: rotate(90deg);
    }
} 